<h1>Listing users</h1>

<table>
  <tr>
    <th>Email</th>
    <th>Password</th>
    <th>Phone</th>
    <th>Fullname</th>
    <th>Address</th>
    <th>Idnumber</th>
    <th>Role</th>
    <th>Last sign in at</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @users.each do |user| %>
  <tr>
    <td><%= user.email %></td>
    <td><%= user.password %></td>
    <td><%= user.phone %></td>
    <td><%= user.fullname %></td>
    <td><%= user.address %></td>
    <td><%= user.idnumber %></td>
    <td><%= user.role %></td>
    <td><%= user.last_sign_in_at %></td>
    <td><%= link_to 'Show', user %></td>
    <td><%= link_to 'Edit', edit_user_path(user) %></td>
    <td><%= link_to 'Destroy', user, method: :delete, data: { confirm: 'Are you sure?' } %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New User', new_user_path %>
